package com.demo.controller.front;

import java.util.Date;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.demo.common.model.Article;
import com.demo.common.model.ArticleTag;
import com.demo.common.model.Tag;
import com.demo.controller.BaseController;
import com.demo.interceptor.DataInterceptor;
import com.demo.tools.ToolWeb;
import com.jfinal.aop.Before;
import com.jfinal.core.Action;
import com.jfinal.core.Controller;
import com.jfinal.json.Json;
import com.jfinal.kit.JsonKit;
import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
/**
 * 
 * @author Emode
 * 标签管理
 */
public class TagController extends BaseController<Tag> {
	public void index() {
		Integer page = getParaToInt("page",1);
		renderJson(Tag.me.paginate(page, 10,getQueryParam()));
	}

	// 搜索
	//@Before(DataInterceptor.class)
	public void search() {
		System.out.println(getPara("key"));
		Integer page = getParaToInt("page");
		page = page==null?1:page;
		success(Tag.me.paginate(page, 10,getQueryParam()));
	}
	


}
